using UnityEngine;
using System.Collections.Generic;

public abstract class Enemy : MonoBehaviour
{
    public float moveSpeed;
    public int health = 100;
    public int attackPower;

    public virtual void Move()
    {
        // 默认移动逻辑，子类可以重写
    }

    public virtual void AttackHost()
    {
        // 默认攻击逻辑，子类可以重写
    }

    public virtual void TakeDamage(int damage)
    {
        health -= damage;
        if (health <= 0)
        {
            Die();
        }
    }

    protected virtual void Die()
    {
        Destroy(gameObject);
    }
}
